package com.ruoyi.animal.service.impl;

import java.util.List;

import com.ruoyi.animal.domain.AnimalInfoUser;
import com.ruoyi.animal.mapper.AnimalInfoUserMapper;
import com.ruoyi.animal.service.IAnimalInfoUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *  动物与户主联Service业务层处理
 * 
 * @author zhezhi
 * @date 2022-10-06
 */
@Service
public class AnimalInfoUserServiceImpl implements IAnimalInfoUserService
{
    @Autowired
    private AnimalInfoUserMapper animalInfoUserMapper;

    /**
     * 查询动物与户主联
     * 
     * @param infoId 动物与户主联主键
     * @return 动物与户主联
     */
    @Override
    public AnimalInfoUser selectAnimalInfoUserByInfoId(Long infoId)
    {
        return animalInfoUserMapper.selectAnimalInfoUserByInfoId(infoId);
    }

    /**
     * 查询动物与户主联列表
     * 
     * @param animalInfoUser 动物与户主联
     * @return 动物与户主联
     */
    @Override
    public List<AnimalInfoUser> selectAnimalInfoUserList(AnimalInfoUser animalInfoUser)
    {
        return animalInfoUserMapper.selectAnimalInfoUserList(animalInfoUser);
    }

    /**
     * 新增动物与户主联
     * 
     * @param animalInfoUser 动物与户主联
     * @return 结果
     */
    @Override
    public int insertAnimalInfoUser(AnimalInfoUser animalInfoUser)
    {
        return animalInfoUserMapper.insertAnimalInfoUser(animalInfoUser);
    }

    /**
     * 修改动物与户主联
     * 
     * @param animalInfoUser 动物与户主联
     * @return 结果
     */
    @Override
    public int updateAnimalInfoUser(AnimalInfoUser animalInfoUser)
    {
        return animalInfoUserMapper.updateAnimalInfoUser(animalInfoUser);
    }

    /**
     * 批量删除动物与户主联
     * 
     * @param infoIds 需要删除的动物与户主联主键
     * @return 结果
     */
    @Override
    public int deleteAnimalInfoUserByInfoIds(Long[] infoIds)
    {
        return animalInfoUserMapper.deleteAnimalInfoUserByInfoIds(infoIds);
    }

    /**
     * 删除动物与户主联信息
     * 
     * @param infoId 动物与户主联主键
     * @return 结果
     */
    @Override
    public int deleteAnimalInfoUserByInfoId(Long infoId)
    {
        return animalInfoUserMapper.deleteAnimalInfoUserByInfoId(infoId);
    }
}
